<template>
	<view class="container">
		<view class="" style="display: flex;align-items: center;margin-top: 0px;">
			<view class="tag">原密码：</view>
			<uni-easyinput v-model="user.oldPassword" placeholder="请输入原密码" />
		</view>
		<view class="" style="display: flex;align-items: center;margin-top: 20px;">
			<view class="tag">新密码：</view>
			<uni-easyinput v-model="user.newPassword" type="text" placeholder="请输入新密码" />
		</view>
		<button type="primary" @click="submit" style="margin-top: 20px;">确定</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				user: {
					"newPassword": "",
					"oldPassword": ""
				}
			};
		},
		onLoad(item) {

		},
		onReady() {

		},
		onShow() {

		},
		methods: {
			submit() {
				this.isEmpty(this.user)
				this.put('/prod-api/api/common/user/resetPwd', this.user).then(res => {
					uni.showToast({
						title: res.msg,
						icon: 'none'
					});

				})
			}
		}
	};
</script>

<style lang="scss">
	page {
		background-color: white;
	}
</style>
